<?php
use Johnm\Probackend\Datatable\Facades\DatatableFacade as Datatable;
use Johnm\Probackend\Asset\Asset;

/**
 * =============================================================================
 * Prerender table
 * =============================================================================
 */
$table = Datatable::table()->noScript();
$table->addColumn($table_colums);
if (!is_null($table_options) && is_array($table_options) && count($table_options) > 0) {
    $table->setOptions($table_options);
}
$table->setId('crub-datatable');
$table->setUrl($table_url);
$panel_options = [
    'title' => $table_title,
    'create_modal_id' => 'crub-create-model-dialog',
    'create_label' => $table_create_label,
];
Asset::addScript($table->script());